-- odd_floor
-- created by panyl
-- 地牢格子：奇怪的地板

return {
    -- 自动战斗
    autoFight = function(grid)
        local dbase = DungeonM.queryElement(grid.element, "dbase");
        if type(dbase) == "table" and type(dbase["need_property"]) == "number" then
            -- 配置了需要道具才出现
            if ItemM.getAmount(ME.user, dbase["need_property"]) <= 0 then
                -- 包裹中没有需求的道具
                return false;
            end
        end

        local pos = grid:getPos();
        return DungeonActionM.go("do_building_bonus", pos, nil, { remainGrid = true });
    end,
};
